← Back to issue list

No way to express different build dependencies on different architectures without repetition of the list of dependencies

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2086482
Type
issue
State
open
Author
~fnordahl
Labels
Created
2024-11-01 19:04:12.299115+00:00
Updated
2024-11-01 19:04:12.299115+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

The snapcraft advanced grammar [0] does unfortunately not allow us to express different build dependencies on different architectures without repetition of the list of dependencies. Making use of composition at the YAML level is also not possible because merging sequences is just not supported [1]. While our current use case fortunately [2] do not contain a lot of dependencies this may quickly become an issue for us. Previously I'm sure it was possible to list dependencies relevant for all architectures and at the same time have a few blocks for architecture specific dependencies, but this appears to no longer work. The interesting thing is that if I use `to` or `on` with a single selector, combining lists appear to work, but if I add a list of selectors it appear to not work, e.g: build-snaps: - go/1.22/stable - on amd64: - golangci-lint vs: build-snaps: - go/1.22/stable - on amd64,arm64,ppc64el,s390x: - golangci-lint The latter matches the documented behavior [0], but only the former appear to (insufficiently) work. What does work is [2], but it's not great. 0: https://snapcraft.io/docs/snapcraft-advanced-grammar 1: https://github.com/yaml/yaml/issues/35#issuecomment-496184265 2: https://github.com/canonical/microovn/commit/837a2617770c8b6400d624d1eba34e4cb97472ff

Evaluation history

No evaluation history available.